﻿<phone:PhoneApplicationPage 
    x:Class="WP7Square.MainMenu"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="False"
    d:DataContext="{d:DesignData}">

    <!--Data context is set to sample data above-->
    <Grid x:Name="LayoutRoot" Background="{StaticResource BackgroundBrush}">
                 
        <Grid.RowDefinitions>
            <RowDefinition Height="100"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--This is the name of the application and page title-->
        <Grid Grid.Row="0" Height="120" Width="480" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
            <Grid.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#3F787878"/>
                    <GradientStop Color="#00000000" Offset="0.5"/>
                    <GradientStop Color="#BB000000" Offset="1"/>
                </LinearGradientBrush>
            </Grid.Background>
            <Image Height="61" VerticalAlignment="Center" Source="Images/foursquare_logo.png" />
        </Grid>
        <!--This section is sample list content-->
        <Grid Grid.Row="1">
            <ListBox x:Name="MainMenuListView" Height="Auto" SelectionMode="Single" ItemsSource="{Binding Items}" SelectionChanged="ListView_SelectionChanged" Style="{StaticResource ListBoxStyle}">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid Width="470" Height="125">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="68" />
                                <ColumnDefinition Width="472"  />
                            </Grid.ColumnDefinitions>
                            <Image
                                Grid.Column="0"
                                Style="{StaticResource MainMenuItemIconStyle}"
                                Source="{Binding Path=IconPath, Converter={StaticResource imgUrlConverter}}" />
                            <StackPanel Grid.Column="1">
                                <TextBlock Text="{Binding LineOne}" Style="{StaticResource MainMenuItemTitleStyle}"/>
                                <TextBlock Text="{Binding LineTwo}" Style="{StaticResource MainMenuSubItemTitleStyle}"/>
                            </StackPanel>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
    </Grid>
</phone:PhoneApplicationPage>